<?php if(!empty($student_all_profiles)) :?>
	<div class="accord">
	  <?php foreach($student_all_profiles as $v): ?>
			
			<?php
				$profile = isset($v['profile']) && $v['profile'] ? $v['profile'] : FALSE;
				$schedules = isset($v['schedule']) && $v['schedule'] ? $v['schedule'] : FALSE;
			?>	

			<h4>SY <?php echo $profile->sy_from.' - '.$profile->sy_to; echo $profile->desc!=''?' ( '.$profile->desc.' )':''; ?></h4>

			<div>
				<?if($schedules):?>
					
					<div class="table-reponsive">
						
							<table class="table table-bordered table-stripped table-compressed">
								<tr class="info">
									<td>#</td>
									<td>Subject Code</td>
									<td>Subject Description</td>
									<td>Day</td>
									<td>Time</td>
									<td>Teacher</td>
								</tr>
								<tbody class="tabular">

						  <?$i = 1; foreach($schedules as $row) :?>
									<tr>
										<td><?= $i++; ;?>.</td>
										<td><?= $row->subj_code ;?></td>
										<td><?= $row->subj_desc ;?></td>
										<td><?= $row->day ;?></td>
										<td><?= $row->time;?></td>
										<td><?= $row->teacher_name;?></td>
									</tr>
								<? endforeach ;?>

						  </tbody>
						</table>

					</div>

				<?else:?>
					<div class="alert alert-warning">Unable to get student subject schedule. Because 1). Student is not assigned to a section. 2). Curriculum has no subjects.</div>
				<?endif;?>
			</div>

		<?php endforeach; ?>
	</div>
<?php endif; ?>
